#include "stdafx.h"
#include "crHttpCookies.h"

NS_CR_BEGIN

namespace http
{

	Cookies::Cookies(const _STD initializer_list<_STD pair<const string, string>>& pairs)
	{}

	string& Cookies::operator[](const string& key)
	{
		return map_[key];
	}

	string Cookies::GetEncoded() const
	{
		_STD stringstream stream;

		for (const auto& item: map_)
		{
			stream << item.first << "=";
		}

		return stream.str();
	}

}

NS_CR_END